﻿@section header
    {
    <link rel="stylesheet" href="/css/treetable.css" />
    <link rel="stylesheet" href="/js/dtree/dtree.css" />
    <link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
}
    <blockquote class="layui-elem-quote news_search toolList" id="menus">
    </blockquote>
    <div class="demotable toolList layui-col-xs6" style="float:left;margin-left:20px;">
        线路名称：
        <div class="layui-inline">
            <input class="layui-input" name="LineName" id="LineName" autocomplete="off">
        </div>
        起点
        <div class="layui-inline">
            <input class="layui-input" name="Origin" id="Origin" autocomplete="off">
        </div>
        终点
        <div class="layui-inline">
            <input class="layui-input" name="Destination" id="Destination" autocomplete="off">
        </div>
        是否外协
        <div class="layui-inline">
            <select name="IsOutsource" lay-verify="required">
                <option value=1>是</option>
                <option value=2>否</option>
            </select>
        </div>
        货主单位：
        <div class="layui-inline">
            <input class="layui-input" name="Unit" id="Unit" autocomplete="off">
        </div>
        货主手机号：
        <div class="layui-inline">
            <input class="layui-input" name="Phone" id="Phone" autocomplete="off">
        </div>
        <div >
            <button class="layui-btn" data-type="search">搜索</button>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-col-xs2">
            <ul id="tree" class="ztree"
            style="padding: 2px; border: 1px solid #ddd; overflow: auto;">
            </ul>
        </div>
        <div class="layui-col-xs10">
            @*<table class="layui-table"
               lay-data="{height: 'full-80', page:true, id:'mainList'}"
               lay-filter="list" lay-size="sm">


            </table>*@

            <table id="mainList" lay-filter="test" page:true></table>
            <script type="text/html" id="StateTpl">
                {{# if(d.State == 1){ }}
                <span class="layui-badge layui-bg-blue">启用</span>
                {{# } else{}}
                <span class="layui-badge layui-bg-red">禁用</span>
                {{# } }}
            </script>

            <script type="text/html" id="IsOutsourceTpl">
                    {{#  if(d.IsOutsource == 1){ }}
                    <span class="layui-badge layui-bg-green">是</span>
                    {{#  } else {}}
                   <span class="layui-badge">否</span>
                    {{#  } }}
            </script>
            <script type="text/html" id="mainList">
                <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="mainList">查看</a>
            </script>
        </div>
    </div>

    <!--用户添加/编辑窗口-->
<div id="divEdit" style="display: none">                                                                                                                                                                                                                                                                                                                                                                                                           
    <form class="layui-form layui-form-pane" action=""  id="formEdit">

        <input type="hidden" name="Id" v-model="tmp.Id" />

            <div class="layui-form-item">
                <label class="layui-form-label">线程名称</label>
                <div class="layui-input-block">
                    <input type="text" name="LineName" v-model="tmp.Linename" required lay-verify="required"
                       placeholder="请输入昵称或线路名称" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">起点</label>
                <div class="layui-input-block">
                    <input type="text" name="Origin" v-model="tmp.Origin" required lay-verify="required"
                       placeholder="请输入起点" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">起点详细地址</label>
                <div class="layui-input-block">
                    <textarea name="OriginAddress" placeholder="请输入起点详细地址" class="layui-textarea"></textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">终点</label>
                <div class="layui-input-block">
                    <input type="text" name="Destination" v-model="tmp.Destination" required lay-verify="required"
                       placeholder="请输入终点" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">终点详细地址</label>
                <div class="layui-input-block">
                    <textarea name="DestinationAddress" placeholder="请输入终点详细地址" class="layui-textarea"></textarea>
                </div>
            </div>

             <div class="layui-form-item">
                <label class="layui-form-label">是否外协</label>
                <div class="layui-input-block">
                    <select name="IsOutsource" lay-verify="required">
                    <option value=1>是</option>
                    <option value=2>否</option> 
                  </select>
                </div>
             </div>

            <div class="layui-form-item">
                <label class="layui-form-label">货主姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="Shipper" v-model="tmp.Shipper" required lay-verify="required"
                       placeholder="请输入货主姓名" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">货主手机号</label>
                <div class="layui-input-block">
                    <input type="text" name="Phone" v-model="tmp.Phone" required lay-verify="required"
                       placeholder="请输入货主手机号" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">货主单位</label>
                <div class="layui-input-block">
                    <input type="text" name="Unit" v-model="tmp.Unit" required lay-verify="required"
                       placeholder="请输入货主单位" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item" pane>
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <input type="text" name="Remark" v-model="tmp.Remark" required lay-verify="required"
                    placeholder="请输入备注" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
                    <button type="reset" id="reset" class="layui-btn layui-btn-primary" >重置</button>
                </div>
            </div>
    </form>
</div>




    <script type="text/javascript" src="/layui/layui.js"></script>
    <script type="text/javascript" src="/userJs/tmsline.js"></script> 

